﻿@model MVC3MusicStore.Models.Album
@{
    ViewBag.Title = "Create";
}
<h2>
    Create</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Album</legend>
        <div class="control-group">
            @Html.LabelFor(model => model.GenreId)
            <div class="controls">
                @Html.DropDownList("GenreId", String.Empty)
            </div>
        </div>
        <div class="control-group">
            @Html.LabelFor(model => model.ArtistId)
            <div class="controls">
                @Html.DropDownList("ArtistId", String.Empty)
            </div>
        </div>
        <div class="control-group">
            @Html.LabelFor(model => model.Title)
            <div class="controls">
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title)
            </div>
        </div>
        <div class="control-group">
            @Html.LabelFor(model => model.Price)
            <div class="controls">
                @Html.EditorFor(model => model.Price)
                @Html.ValidationMessageFor(model => model.Price)
            </div>
        </div>
        <div class="control-group">
            @Html.LabelFor(model => model.AlbumArtUrl)
            <div class="controls">
                @Html.EditorFor(model => model.AlbumArtUrl)
                @Html.ValidationMessageFor(model => model.AlbumArtUrl)
            </div>
        </div>
        <div class="form-actions">
            <input type="submit" class="btn btn-primary" value="Create" />
            <a href="/StoreManager" class="btn">Back to List</a>
        </div>
    </fieldset>
}
 
<script type="text/javascript">
    $(document).ready(function () {
        $('form').addClass('form-horizontal');
        $('label').addClass('control-label');

    });
</script>
